﻿<Window x:Class="StreamInsight.Samples.SequenceIntegration.PerformanceCounters.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c="clr-namespace:StreamInsight.Samples.SequenceIntegration;assembly=Common"
        Title="Performance Counters StreamInsight" 
        MinHeight="350" 
        MinWidth="525"
        Background="LightGray">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Border BorderBrush="SlateGray" 
                BorderThickness="2" 
                CornerRadius="2" 
                Margin="5, 3">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0" 
                           Margin="5, 3">
                    <Bold>Processor Utilization Query</Bold>
                </TextBlock>
                <c:ObservableDataGridControl 
                    x:Name="_processor" 
                    Grid.Row="1" 
                    Margin="5, 3"/>
            </Grid>
        </Border>
        <Border BorderBrush="SlateGray" 
                BorderThickness="2" 
                CornerRadius="2" 
                Margin="5, 3" 
                Grid.Column="1">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <TextBlock 
                    Grid.Row="0" 
                    Margin="5, 3">
                    <Bold>Sustained Threshold Query</Bold>
                </TextBlock>
                <Grid Grid.Row="1">
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="50"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Margin="5, 3" 
                               Text="Threshold:" 
                               ToolTip="Threshold above which events are produced."/>
                    <Slider Margin="5,3" 
                            Name="_thresholdSlider" 
                            Minimum="0" 
                            Maximum="100" 
                            Value="5" 
                            Grid.Column="1" />
                    <TextBlock 
                        Margin="5, 3" 
                        Grid.Column="2" 
                        TextAlignment="Right">
                        <TextBlock Text="{Binding ElementName=_thresholdSlider, Path=Value}" />%
                    </TextBlock>
                    <TextBlock 
                        Margin="5, 3" 
                        Text="Duration:" 
                        Grid.Row="1" 
                        ToolTip="Duration during which minimum threshold must be sustained."/>
                    <TextBox 
                        Margin="5, 3" 
                        Text="1" 
                        Name="_durationTextBox" 
                        Grid.Row="1" 
                        Grid.Column="1" />
                    <TextBlock 
                        Margin="5, 3" 
                        Text="sec." 
                        Grid.Column="2" 
                        Grid.Row="1" 
                        TextAlignment="Right" />
                </Grid>
                <c:ObservableDataGridControl 
                    x:Name="_threshold" 
                    Grid.Row="3" 
                    Margin="5, 3"/>
            </Grid>
        </Border>
    </Grid>
</Window>
